﻿using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;

namespace MicroserviceDemo.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    public class HealthController : ControllerBase
    {
        [HttpGet(nameof(check))]
        public IActionResult check()
        {
            var o = new { code = 200, msg = $"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}" };
            Console.WriteLine( JsonConvert.SerializeObject(o) );
            return Ok(o);
        }

       
    }
}
